﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;

namespace Roton.Engine
{
    public interface IBoard
    {
        /// <summary>
        /// Camera X-position.
        /// </summary>
        [
        Category("Environment"),
        DisplayName("Camera X"),
        TypeConverter(typeof(Int16Converter)),
        ]
        int CameraX { get; set; }

        /// <summary>
        /// Camera Y-position.
        /// </summary>
        [
        Category("Environment"),
        DisplayName("Camera Y"),
        TypeConverter(typeof(Int16Converter)),
        ]
        int CameraY { get; set; }

        /// <summary>
        /// Board index assigned to the east edge.
        /// </summary>
        [
        Category("Exits"),
        DisplayName("Exit East"),
        TypeConverter(typeof(ByteConverter)),
        ]
        int ExitEast { get; set; }

        /// <summary>
        /// Board index assigned to the north edge.
        /// </summary>
        [
        Category("Exits"),
        DisplayName("Exit North"),
        TypeConverter(typeof(ByteConverter)),
        ]
        int ExitNorth { get; set; }

        /// <summary>
        /// Board index assigned to the south edge.
        /// </summary>
        [
        Category("Exits"),
        DisplayName("Exit South"),
        TypeConverter(typeof(ByteConverter)),
        ]
        int ExitSouth { get; set; }

        /// <summary>
        /// Board index assigned to the west edge.
        /// </summary>
        [
        Category("Exits"),
        DisplayName("Exit West"),
        TypeConverter(typeof(ByteConverter)),
        ]
        int ExitWest { get; set; }

        /// <summary>
        /// Height of the board, in tiles.
        /// </summary>
        [
        Category("Environment"),
        DisplayName("Height"),
        ReadOnly(true),
        ]
        int Height { get; }

        /// <summary>
        /// If nonzero, the board is dark.
        /// </summary>
        [
        Category("Environment"),
        DisplayName("Is Dark"),
        TypeConverter(typeof(ByteConverter)),
        ]
        int IsDark { get; set; }

        /// <summary>
        /// Number of player bullets that are allowed on the board at once.
        /// </summary>
        [
        Category("Environment"),
        DisplayName("Maximum Shots"),
        TypeConverter(typeof(ByteConverter)),
        ]
        int MaxPlayerShots { get; set; }

        /// <summary>
        /// Name of the board.
        /// </summary>
        [
        Category("Environment"),
        DisplayName("Name"),
        TypeConverter(typeof(StringConverter)),
        ]
        string Name { get; set; }

        /// <summary>
        /// Player entrance X-position.
        /// </summary>
        [
        Category("Environment"),
        DisplayName("Player Enter X"),
        TypeConverter(typeof(ByteConverter)),
        ]
        int PlayerEnterX { get; set; }

        /// <summary>
        /// Player entrance Y-position.
        /// </summary>
        [
        Category("Environment"),
        DisplayName("Player Enter Y"),
        TypeConverter(typeof(ByteConverter)),
        ]
        int PlayerEnterY { get; set; }

        /// <summary>
        /// If nonzero, when the player is harmed, they are sent back to the location where they entered the board.
        /// </summary>
        [
        Category("Environment"),
        DisplayName("Restart on Zap"),
        TypeConverter(typeof(ByteConverter)),
        ]
        int RestartOnZap { get; set; }

        /// <summary>
        /// If nonzero, the time limit of the board in seconds. When this time runs out, the player is harmed.
        /// </summary>
        [
        Category("Environment"),
        DisplayName("Time Limit"),
        TypeConverter(typeof(ByteConverter)),
        ]
        int TimeLimit { get; set; }

        /// <summary>
        /// Width of the board, in tiles.
        /// </summary>
        [
        Category("Environment"),
        DisplayName("Width"),
        ReadOnly(true),
        ]
        int Width { get; }
    }
}
